﻿// See https://aka.ms/new-console-template for more information

// 创建日志管理器

using LogService;
using LogService.Factory;

var loggerManager = new LoggerManager();

// 创建不同的日志记录器
var consoleLoggerFactory = new ConsoleLoggerFactory();
var fileLoggerFactory = new FileLoggerFactory();
var databaseLoggerFactory = new DatabaseLoggerFactory();

// 添加日志记录器到日志管理器中
loggerManager.AddLogger(new TimestampLogger(consoleLoggerFactory.CreateLogger()));
loggerManager.AddLogger(new TimestampLogger(fileLoggerFactory.CreateLogger()));
loggerManager.AddLogger(new TimestampLogger(databaseLoggerFactory.CreateLogger()));

// 记录日志
loggerManager.Log("Application started.");